import { RouteRecordRaw } from 'vue-router';
import EmptyLayout from '@/layout/empty.vue';
import CimupLayout from '@/layout/cimup.vue';

const routes: RouteRecordRaw[] = [
  {
    path: '/login',
    name: 'login',
    redirect: '/project',
  },
  {
    path: '/share',
    name: 'share',
    meta: {
      path: '/scene',
      title: '分享',
    },
    component: EmptyLayout,
    children: [
      {
        path: 'scene/:shareCode',
        name: 'scenePreviewShare',
        meta: {
          path: '/share/scene',
          title: '场景分享查看',
          layout: CimupLayout,
        },
        component: () => import('@/views/share/scene/index.vue'),
      },
      {
        path: 'prepare',
        name: 'scenePreviewShareValidate',
        meta: {
          path: '/share/prepare',
          title: '场景分享查看',
        },
        component: () => import('@/views/scene/share-validate/index.vue'),
      },
      {
        path: 'noauth',
        name: 'shareNoAuth',
        meta: {
          path: '/share/noauth',
          title: '场景分享查看无权限',
        },
        component: () => import('@/views/scene/share-noauth/index.vue'),
      },
    ],
  },
];
export default routes;
